#include <bits/stdc++.h>
using namespace std;

class Solution
{
public:
    int main()
    {
        int n;
        cin >> n;
        char *sum = new char[100];
        char *product = new char[100];
        char *temp = new char[100];
        char *num = new char[2];
        int productLen = WriteNumToArray(1, product);
        int sumLen = 0;
        for (int i = 1; i <= n; ++i)
        {
            int numLen = WriteNumToArray(i, num);
            productLen = HighPrecisionMultiply(product, productLen, num, numLen, temp);
            swap(product, temp);
            sumLen = HighPrecisionSum(product, productLen, sum, sumLen, temp);
            swap(sum, temp);
        }
        for (int i = sumLen - 1; i >= 0; --i)
        {
            cout << static_cast<char>(sum[i] + '0');
        }
        delete[] sum;
        delete[] product;
        delete[] temp;
        delete[] num;
        return 0;
    }

    static int WriteNumToArray(int num, char *result)
    {
        int len = 0;
        while (num)
        {
            result[len] = static_cast<char>(num % 10);
            num /= 10;
            ++len;
        }
        return len;
    }

    static int HighPrecisionMultiply(char *a, int aLen, char *b, int bLen, char *result)
    {
        memset(result, 0, aLen + bLen);
        for (int i = 0; i < aLen; ++i)
        {
            for (int j = 0; j < bLen; ++j)
            {
                result[i + j] += a[i] * b[j];
                result[i + j + 1] += result[i + j] / 10;
                result[i + j] %= 10;
            }
        }
        if (result[aLen + bLen - 1] != 0)
        {
            return aLen + bLen;
        }
        else
        {
            return aLen + bLen - 1;
        }
    }

    static int HighPrecisionSum(char *a, int aLen, char *b, int bLen, char *result)
    {
        if (aLen < bLen)
        {
            swap(aLen, bLen);
            swap(a, b);
        }
        memset(result, 0, aLen + 1);
        for (int i = 0; i < bLen; ++i)
        {
            result[i] += a[i] + b[i];
            result[i + 1] += result[i] / 10;
            result[i] %= 10;
        }
        for (int i = bLen; i < aLen; ++i)
        {
            result[i] += a[i];
            result[i + 1] += result[i] / 10;
            result[i] %= 10;
        }
        if (result[aLen] == 0)
        {
            return aLen;
        }
        else
        {
            return aLen + 1;
        }
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif